<?php

namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Contracts\Auth\Authenticatable as ContractsAuthenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Auth\Authenticatable as AuthAuthenticatable;

class User extends Base implements ContractsAuthenticatable
{
    use Notifiable;
//    use SoftDeletes;
    use AuthAuthenticatable;

    /**
     * The attributes that are mass assignable.
     *
     * @var array
     */
    protected $fillable = [
        'phone', 'password', 'top_id', 'inviter', 'last_login_ip','last_login_time'
    ];

    /**
     * The attributes that should be hidden for arrays.
     *
     * @var array
     */
    protected $hidden = [
        'password', 'remember_token',
    ];


    public function alls()
    {
        return $this->hasMany('App\Models\User', 'top_id', 'id');
    }

}
